package com.ytc.controller;

import com.ytc.model.Booklist;
import com.ytc.model.Bookshelf;
import com.ytc.model.User;
import com.ytc.service.BookshelfService;
import com.ytc.service.RankingService;
import com.ytc.util.RankingPageUtil;
import com.ytc.util.RankingPageUtilHelper;
import com.ytc.util.RedisKeyCommon;
import com.ytc.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.TimeUnit;

@Controller
public class RankingController {

    @Autowired
    private RankingService rankingService;
    @Autowired
    private BookshelfService bookshelfService;
    @Autowired
    private RedisTemplate redisTemplate;
    /**
     * 高媛：跳转到排行榜总页面
     * @return
     */
    @RequestMapping("toRankingIndex")
    public String toRankingIndex(){
        return "rankingList/ranking";
    }

//    /**
//     * 高媛：男生榜女生榜分类按钮
//     * @return
//     */
//    @RequestMapping("rankingBotton")
    @RequestMapping("toGirlEndBank")
    @Cacheable(cacheNames = RedisKeyCommon.QUERY_ORDER_BY_GIRL_END)
    public String toGirlEndBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.queryOrderByGirlEnd();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.QUERY_ORDER_BY_GIRL_END)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.QUERY_ORDER_BY_GIRL_END);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.QUERY_ORDER_BY_GIRL_END, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/girlEndBank";
    }
    /**
     * 高媛：男完排行榜封面，前10条
     * @param model
     * @return
     */
    @RequestMapping("toBoyEndBank")
    @Cacheable(cacheNames = RedisKeyCommon.QUERY_ORDER_BY_BOY_END)
    public String toBoyEndBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.queryOrderByBoyEnd();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.QUERY_ORDER_BY_BOY_END)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.QUERY_ORDER_BY_BOY_END);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.QUERY_ORDER_BY_BOY_END, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/boyEndBank";
    }

    /**
     * 高媛：女生藏排行榜封面
     */
    @RequestMapping("toGirlCollectBank")
    @Cacheable(cacheNames = RedisKeyCommon.GIRL_COLLECT)
    public String toGirlCollectBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.girlCollect();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.GIRL_COLLECT)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.GIRL_COLLECT);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.GIRL_COLLECT, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/girlCollectBank";
    }

    /**
     * 高媛：男收藏排行榜封面
     */
    @RequestMapping("toBoyCollectBank")
    @Cacheable(cacheNames = RedisKeyCommon.BOY_COLLECT)
    public String toBoyCollectBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.boyCollect();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.BOY_COLLECT)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.BOY_COLLECT);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.BOY_COLLECT, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/boyCollectBank";
    }
    /**
     * 高媛：女生新书热度榜封面
     */
    @RequestMapping("toGirlNewBank")
    @Cacheable(cacheNames = RedisKeyCommon.GIRL_NEW)
    public String toGirlNewBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.girlNew();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.GIRL_NEW)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.GIRL_NEW);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.GIRL_NEW, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/girlNewBank";
    }
    /**
     * 高媛：男生新书热度榜封面
     */
    @RequestMapping("toBoyNewBank")
    @Cacheable(cacheNames = RedisKeyCommon.BOY_NEW)
    public String toBoyNewBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.boyNew();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.BOY_NEW)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.BOY_NEW);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.BOY_NEW, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/boyNewBank";
    }
    /**
     * 高媛：女生新书更新榜封面
     */
    @RequestMapping("toGirlUpdateBank")
    @Cacheable(cacheNames = RedisKeyCommon.GIRL_UPDATE_COUNT)
    public String toGirlUpdateBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.girlUpdateCount();
        List<Booklist> numlist=rankingService.countUpdateNumByGirl();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        list.sort(Comparator.comparing(Booklist::getSumCount).reversed());
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setBlRow(i+1);
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.GIRL_UPDATE_COUNT)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.GIRL_UPDATE_COUNT);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.GIRL_UPDATE_COUNT, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/girlUpdateBank";
    }
    /**
     * 高媛：男生新书更新榜封面
     */
    @RequestMapping("toBoyUpdateBank")
    @Cacheable(cacheNames = RedisKeyCommon.BOY_UPDATE_COUNT)
    public String toBoyUpdateBank(Model model){
        List<Booklist> list=new ArrayList<>();
        List<Booklist> list1=rankingService.boyUpdateCount();
        List<Booklist> numlist=rankingService.countUpdateNumByBoy();
        if(list1.size()>=10) {
            for (int i = 0; i < 10; i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }else{
            for (int i = 0; i < list1.size(); i++) {
                if (list1.get(i) != null) {
                    list.add(list1.get(i));
                }
            }
        }
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        list.sort(Comparator.comparing(Booklist::getSumCount).reversed());
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setBlRow(i+1);
        }
        ValueOperations<String, Object> sov =redisTemplate.opsForValue();
        if(redisTemplate.hasKey(RedisKeyCommon.BOY_UPDATE_COUNT)){
            //存在则读取缓存
            List<Booklist> b1 = (List<Booklist>) sov.get(RedisKeyCommon.BOY_UPDATE_COUNT);
            model.addAttribute("list",b1);
        }else { //不存在则存入
            List<Booklist> b2 = list;
            model.addAttribute("list",b2);
            sov.set(RedisKeyCommon.BOY_UPDATE_COUNT, b2,1,TimeUnit.DAYS);
        }
//        model.addAttribute("list",list);
        return "rankingList/boyUpdateBank";
    }


    /**
     * 高媛：toGetHeadRight
     * @return
     */
    @RequestMapping("toGetHeadRight")
    public String toGetHeadRight(){
        return "rankingList/headRight";
    }

    /*高媛：跳转到女完排行页面*/
    @RequestMapping("toGirlEnd")
    public String toGirlEnd(){
        return "rankingList/toGirlEnd";
    }
    /**
     * 高媛：女生完结榜,根据点击量排行
     */
    @RequestMapping("girlEnd")
    public String girlEnd(Model model,HttpServletRequest request, RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.queryOrderByGirlEnd();
//        System.out.println(list);
        List<Booklist> numlist=rankingService.countNumByGirl();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        RankingPageUtil page1= RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/girlEnd";
    }

    /*高媛：跳转到男完排行页面*/
    @RequestMapping("toBoyEnd")
    public String toBoyEnd(){
        return "rankingList/toBoyEnd";
    }
    /**
     * 高媛：男生完结榜,根据点击量排行
     */
    @RequestMapping("boyEnd")
    public String boyEnd(Model model,HttpServletRequest request, RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.queryOrderByBoyEnd();
//        System.out.println(list);
        List<Booklist> numlist=rankingService.countNumByBoy();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        RankingPageUtil page1= RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/boyEnd";
    }
    /**
     * 高媛：跳转到女生收藏榜
     * */
    @RequestMapping("toGirlCollect")
    public String toGirlCollect(){
        return "rankingList/toGirlCollect";
    }
    /**
     * 高媛：女生收藏榜
     */
    @RequestMapping("girlCollect")
    public String girlCollect(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.girlCollect();
        List<Booklist> numlist=rankingService.countNumByGirl();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
//        System.out.println(numlist);
//        System.out.println(list);
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/girlCollect";
    }
    /**
     * 高媛：跳转到男生收藏榜
     * */
    @RequestMapping("toBoyCollect")
    public String toBoyCollect(){
        return "rankingList/toBoyCollect";
    }
    /**
     * 高媛：男生收藏榜
     */
    @RequestMapping("boyCollect")
    public String boyCollect(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.boyCollect();
//        System.out.println(list);
        List<Booklist> numlist=rankingService.countNumByBoy();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/boyCollect";
    }
    /**
     * 高媛：跳转到女生新书热度榜
     */
    @RequestMapping("toGirlNew")
    public String toGirlNew(){
        return "rankingList/toGirlNew";
    }
    /**
     * 高媛：女生新书热度榜(收藏*10+评论*2+点击*1)
     */
    @RequestMapping("girlNew")
    public String girlNew(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list = rankingService.girlNew();
//        System.out.println(list);
        List<Booklist> numlist=rankingService.countNumByBoy();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/GirlNew";
    }
    /**
     * 高媛：跳转到男生新书热度榜
     */
    @RequestMapping("toBoyNew")
    public String toBoyNew(){
        return "rankingList/toBoyNew";
    }
    /**
     * 高媛：男生新书热度榜(收藏*10+评论*2+点击*1)
     */
    @RequestMapping("boyNew")
    public String boyNew(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list = rankingService.boyNew();
//        System.out.println(list);
        List<Booklist> numlist=rankingService.countNumByBoy();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/boyNew";
    }
    /**
     * 高媛：跳转女生7天更新字数排行
     */
    @RequestMapping("toGirlUpdateCount")
    public String toGirlUpdateCount(){
        return "rankingList/toGirlUpdateCount";
    }
    /**
     * 高媛：女生7天更新字数排行
     */
    @RequestMapping("girlUpdateCount")
    public String girlUpdateCount(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.girlUpdateCount();
        List<Booklist> numlist=rankingService.countUpdateNumByGirl();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
        list.sort(Comparator.comparing(Booklist::getSumCount).reversed());
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setBlRow(i+1);
        }
//        System.out.println(list);
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/girlUpdateCount";
    }
    /**
     * 高媛：跳转男生7天更新字数排行
     */
    @RequestMapping("toBoyUpdateCount")
    public String toBoyUpdateCount(){
        return "rankingList/toBoyUpdateCount";
    }
    /**
     * 高媛：男生7天更新字数排行
     */
    @RequestMapping("boyUpdateCount")
    public String boyUpdateCount(Model model,HttpServletRequest request,RankingPageUtil<Booklist> page){
        List<Booklist> list=rankingService.boyUpdateCount();
        List<Booklist> numlist=rankingService.countUpdateNumByBoy();
        for(int i=0;i<list.size();i++){
            for (int j=0;j<numlist.size();j++){
                if(list.get(i).getBlId()== numlist.get(j).getBlId()){
                    list.get(i).setSumCount(numlist.get(j).getSumCount());
                }
            }
        }
        list.sort(Comparator.comparing(Booklist::getSumCount).reversed());
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setBlRow(i+1);
        }
        User user = UserUtil.getUser(request);
        for (Booklist book:list) {
            if (user!=null){
                Bookshelf bs = bookshelfService.queryShelfByUidAndBid(user.getUId(),book.getBlId());
                if (bs!=null){
                    book.setFlag(true);
                }else {
                    book.setFlag(false);
                }
            }else{
                book.setFlag(false);
            }
        }
//        System.out.println(list);
        RankingPageUtil page1=RankingPageUtilHelper.pageHelper(list,page.getCpage(),page.getPageSize());
        model.addAttribute("pageInfo",page1);
        return "rankingList/boyUpdateCount";
    }

    /**
     * 高媛：点击男生按钮
     * @return
     */
    @RequestMapping("toRankingBoy")
    public String toRankingBoy(){
        return "rankingList/rankingBoy";
    }

    /**
     * 高媛：点击女生按钮
     * @return
     */
    @RequestMapping("toRankingGirl")
    public String toRankingGirl(){
        return "rankingList/rankingGirl";
    }
}
